﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Threading;

namespace PyNet
{
    static class Program
    {
        private static frmConsole consoleForm;
        private static clsLog serverLog;
        private static clsClientThread server;
        private static frmSmallConsole consoleFormSmall;

        internal static frmConsole GetConsole
        {
            get
            {
                return consoleForm;
            }
        }

        internal static clsLog GetLogger
        {
            get
            {
                return serverLog;
            }
        }

        internal static clsClientThread GetServer
        {
            get
            {
                return server;
            }
        }

        internal static frmSmallConsole GetSmallConsole
        {
            get
            {
                return consoleFormSmall;
            }
        }

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ThreadPool.SetMaxThreads(500, 500);
            server = new clsClientThread();
            consoleForm = new frmConsole();
            serverLog = new clsLog();
            consoleFormSmall = new frmSmallConsole();
            clsFileSystem.CheckDir("Ver");
            clsFileSystem.CheckDir("Ver\\Files");
            Application.Run(consoleForm);
        }
    }
}
